package cn.wolfcode.luowowo.member.mapper;

import cn.wolfcode.luowowo.member.domain.UserInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserInfoMapper {
    void insert(UserInfo entity);

    String checkPhone(String phone);

    UserInfo checkLogin(@Param("phone") String phone, @Param("password") String password);

    List<UserInfo> selectAll();

    void updateBaseById(UserInfo userInfo);

    UserInfo selectById(Long id);

    void updateHeadById(@Param("headImgUrl") String headImgUrl, @Param("id") Long id);

    void updatePhoneById(@Param("phone") String phone, @Param("id") Long id);

    List<UserInfo> selectConcernsUser(Long userId);

    Integer selectUserCount(Long userId);

    Integer selectBeUserCount(Long userId);

    void deleteUserConcern(@Param("beConcernId") Long beConcernId, @Param("id") Long id);

    void insertUserConcern(@Param("beConcernId") Long beConcernId, @Param("id") Long id);

    List<Long> selectIsConcernsUser(Long id);

    void updateVisitorsRank(@Param("visitorsCount") int visitorsCount, @Param("userId") Long userId);

    UserInfo selectUserByName(String name);

    void insertBackList(@Param("id") Long id, @Param("blackId") Long blackId);

    List<UserInfo> selectBlackList(Long id);

    List<Long> selectBackListById(Long id);

    void deleteBackList(@Param("id") Long id, @Param("blackId") Long blackId);
}
